package io.shuttle.mbe.api

/**
 * Use the `Browser.accessibilityFeatures` API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request `accessibilityFeatures.read` permission. For modifying feature state, the extension needs `accessibilityFeatures.modify` permission. Note that `accessibilityFeatures.modify` does not imply `accessibilityFeatures.read` permission.
 *
 * Permissions: "accessibilityFeatures.read", "accessibilityFeatures.modify"
 */
interface AccessibilityFeatures {
    /** `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission. */
    val animationPolicy: ChromeSetting<AnimationPolicy>

    /**
     * Auto mouse click after mouse stops moving. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    val autoclick: ChromeSetting<Boolean>

    /**
     * Caret highlighting. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(51)
    val caretHighlight: ChromeSetting<Boolean>

    /**
     * Cursor color. The value indicates whether the feature is enabled or not, doesn't indicate the color of it.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 85
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(85)
    val cursorColor: ChromeSetting<Boolean>

    /**
     * Cursor highlighting. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(51)
    val cursorHighlight: ChromeSetting<Boolean>

    /**
     * Dictation. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 90
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(90)
    val dictation: ChromeSetting<Boolean>

    /**
     * Docked magnifier. The value indicates whether docked magnifier feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 87
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(87)
    val dockedMagnifier: ChromeSetting<Boolean>

    /**
     * Focus highlighting. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(51)
    val focusHighlight: ChromeSetting<Boolean>

    /**
     * High contrast rendering mode. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    val highContrast: ChromeSetting<Boolean>

    /**
     * Enlarged cursor. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    val largeCursor: ChromeSetting<Boolean>

    /**
     * Full screen magnification. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    val screenMagnifier: ChromeSetting<Boolean>

    /**
     * Select-to-speak. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(51)
    val selectToSpeak: ChromeSetting<Boolean>

    /**
     * Spoken feedback (text-to-speech). The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    val spokenFeedback: ChromeSetting<Boolean>

    /**
     * Sticky modifier keys (like shift or alt). The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    val stickyKeys: ChromeSetting<Boolean>

    /**
     * Switch Access. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    @io.shuttle.mbe.api.annotation.ChromeMinVersion(51)
    val switchAccess: ChromeSetting<Boolean>

    /**
     * Virtual on-screen keyboard. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    @io.shuttle.mbe.api.annotation.ChromeOSOnly
    val virtualKeyboard: ChromeSetting<Boolean>
}

enum class AnimationPolicy {
    allowed,
    once,
    none
}

